//
//  BusinessOperation.m
//  RCS
//
//  Created by 黄 浩贤 on 11-04-26.
//  Copyright 2011年 广州市易杰数码科技有限公司. All rights reserved.
//

#import "BusinessOperation.h"



@implementation BusinessOperation

@synthesize target=_target, object=_object, selector=_selector;
//@synthesize managedObjectManager = _managedObjectManager;
//@synthesize curThread = _curThread;

- (void)dealloc {
    [_target release];
    _target=nil;
    [_object release];
    _object=nil;
//	[_managedObjectManager release];
//	[_curThread release];
    [super dealloc];
}

- (void)main {
	
	NSMutableDictionary *dic = [[NSThread currentThread] threadDictionary];
	[dic setObject:self forKey:CURRENT_THREAD_DICTIONARY];
	[self.target performSelector:self.selector withObject:self.object];
	[dic removeObjectForKey:CURRENT_THREAD_DICTIONARY];

     
}
/*
- (void)mergeContextChangesForNotification:(NSNotification *)aNotification{
	
	if (!_curThread || [self isCancelled]) {
		return ;
	}
	
	if ([NSThread currentThread]!=_curThread) {
		
		[_managedObjectManager performSelector:@selector(mergeChangesFromContextDidSaveNotification:) 
									  onThread:_curThread 
									withObject:aNotification 
								 waitUntilDone:NO];
	}
	else{
		[_managedObjectManager mergeChangesFromContextDidSaveNotification:aNotification];
	}
	
}
*/
@end
